package com.jiyongjun.bms.tool.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * description: 服务异常
 *
 * @author yongjun.ji
 * @date 2019/3/4 11:23
 */
@Setter
@Getter
public class ServiceException extends RuntimeException {
    private String code;
    private Object[] args;

    public ServiceException() {
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(String code, Object[] args) {
        this.code = code;
        this.args = args;
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(String message, String code) {
        super(message);
        this.code = code;
    }
}
